package com.galaxy.order.api;

import com.galaxy.common.core.domain.R;
import com.galaxy.order.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 商品服务接口
 */
@FeignClient(
    contextId = "remoteProductSalesService",
    value = "galaxy-product",
    fallbackFactory = RemoteProductFallbackFactory.class,
    configuration = FeignConfig.class
)
public interface RemoteProductService {

    /**
     * 修改销售数
     *
     * @return 商品信息
     */
    @PutMapping("/api/product/updateSales/{productId}/{number}")
    R<Boolean> updateSales(@PathVariable("productId") Long productId,@PathVariable("number")Integer number);

}
